<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
 
   <s:debug></s:debug>
 
   ProductName:${productName }
   <br/><br/>
   ProductDesc:${productDesc }
   <br/><br/>
   ProductPrice:<s:property value="[0].productPrice" />
   <br/><br/>
   ProductPrice:<s:property value="productPrice" />
   <br/><br/>
   
   <!-- 使用OGNL 调用Public类的Public类型的静态字段和静态方法 -->
   <s:property value="@java.lang.Math@PI"/>
   <br/><br/>
   
   <s:property value="@java.lang.Math@cos(0)"/>
   <br/><br/>
   
   <!-- 调用对象栈的方法为一个属性赋值 -->
   <s:property value="setProductName('xiangxin')" />
   <s:property value="productName" />
   <br/><br/>
   
   <!-- 调用数组对象的属性 -->
   <%
     String[] names=new String[]{"aa","bb","cc","dd"};
     request.setAttribute("names", names);
   %>
   Length:<s:property value="#attr.names.length"/>
   <br/><br/>
   name[2]:<s:property value="#attr.names[2]"/>
   <br/><br/>
   
</body>
</html>